
import logging
import yagmail

def log_set():
    #日志文件
    logging.basicConfig(level=logging.DEBUG,format='%(pathname)s-%(msecs)d-%(message)s',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])
def sent_main(a):
    #邮件
    main=yagmail.SMTP(user='3342752247@qq.com',password='kuxsitvkpsaychja',host='smtp.qq.com')
    main.send(to='3342752247@qq.com',subject='测试报告',contents='测试内容',attachments=a)
